An image captured by a camera or a scanned image of a physical document may include text characters as well as other non-text shapes or symbols. Various methods are known for detecting text in an image. These existing methods suffer from various drawbacks. Technical solutions that address at least some of these drawbacks are discussed herein.